home *** CD-ROM | disk | FTP | other *** search
-
-
- /*
- *
- * Application : FlushLib $
- * Revision : 1.0 $
- * Version : 1.0 $
- * Date : 93/08/27 $
- *
- * Copyright (c) 1993 David Scrève
- * All Rights Reserved
- */
-
-
-
- #include <exec/execbase.h>
- #include <clib/exec_protos.h>
- #include <clib/alib_stdio_protos.h>
-
- extern struct ExecBase * __far SysBase;
-
- void main()
- {
- struct Library *LibNode;
-
- Forbid();
- for (LibNode=(struct Library *)SysBase->LibList.lh_Head;LibNode;LibNode=(struct Library *)LibNode->lib_Node.ln_Succ)
- if (!LibNode->lib_OpenCnt)
- RemLibrary(LibNode);
- Permit();
- printf("\nAll Unused Libraries Flushed.\n\n");
- }
-